package com.sms.graduate.utils;

import com.sms.graduate.service.SmsDictionaryService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.UUID;


public class Uuid {

    @Autowired
    SmsDictionaryService smsDictionaryService;

    public static String UUID(int i){
        String s = UUID.randomUUID().toString();
        String s1 = s.replaceAll("-", "")
                .replaceAll("[a-zA-Z]","" );
        String s2 = s1.replaceFirst("^0*", "").substring(0,i);
        return s2;
    }

    public String UUIDUtils(int a,int b){
        switch (a){
            case 1:
                return "1";
            case 2:
                return "2";
        }
        return "类型和长度填写不规范，请重新填写";
    }

    public static String classByUserCode(String userCode){

        String substring = userCode.substring(0, 4);
        String substring1 = userCode.substring(4, 6);
        String substring2 = userCode.substring(6, 8);
        String substring3 = userCode.substring(8, 10);
        return null;
    }

}
